package com.yue.rpc;

import com.yue.rpc.config.RpcServiceConfig;
import com.yue.rpc.proxy.RpcClientProxy;
import com.yue.rpc.remoting.transport.RpcRequestTransport;
import com.yue.rpc.remoting.transport.socket.SocketRpcClient;

/**
 * @description:
 * @author: zhangqiyue
 * @date: 2023/3/6 16:11
 **/
public class SocketClientMain {
    public static void main(String[] args) {
        RpcRequestTransport rpcRequestTransport = new SocketRpcClient();
        RpcServiceConfig rpcServiceConfig = new RpcServiceConfig();
        RpcClientProxy rpcClientProxy = new RpcClientProxy(rpcRequestTransport, rpcServiceConfig);
        RpcServiceTest rpcService = rpcClientProxy.getProxy(RpcServiceTest.class);
        String hello = rpcService.testRpc(new TestMessage("ZQY", "111"));
        System.out.println(hello);
    }
}
